home *** CD-ROM | disk | FTP | other *** search
- Path: castle.nando.net!news
- From: actuary@nando.net (Bill McCarthy)
- Newsgroups: comp.lang.c
- Subject: Re: BEGINNER --> problem with ATEXIT !!!!
- Date: 5 Feb 1996 16:16:49 GMT
- Organization: News & Observer Public Access
- Message-ID: <4f5ahh$t5f@castle.nando.net>
- References: <its.2.000DC6F8@euronet.nl>
- Reply-To: actuary@nando.net (Bill McCarthy)
- NNTP-Posting-Host: grail1701.nando.net
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <its.2.000DC6F8@euronet.nl>, its@euronet.nl (it's_b.v.) writes:
- >Can somebody help me with the following :
- >
- >I use the atexit() function to start a DOS-batchfile when my program ends.
- >The memory which this program uses is freed AFTER the batch-file has
- >completed.
- >
- >the program-code looks like this :
- >
- >void batch( void )
- > {
- > system("\\BATFILE.BAT");
- > }
- >
- >
- >void main( void )
- > {
- > atexit( batch );
- >
- > /* my program code */
- >
- > exit( 1 );
- > }
- >
- >QUESTION :
- >Is it possible to free the memory which is used by my program BEFORE the
- >batch-file is executed !
-
- I don't see anyway you could accomplish that using the standard library
- functions. If portability is not a major issue, see if the library routines
- include the exec() function. If so, it may suit your needs.
-
- Bill McCarthy
- actuary@nando.net
- Wendell, NC USA
-
-